﻿using System.ComponentModel.DataAnnotations;

namespace FantasyDraft2.Models
{
    public class PlayerGame
    {
        [Key]
        public int PlayerGameId { get; set; }

        public int Goals { get; set; }
        public int Assists { get; set; }
        public int PlayerId { get; set; }
        public int GameId { get; set; }
        public int TeamId { get; set; }
        /*This "isActive" property signifies if a player was on a user's bench or active team during a given player game.  If the value is set to "true", then
         the player's score for that game would be added to the user's total score, if it was set to "false", then that player's score would be ignored and would thus
         not be added to the user's total score*/
        public bool isActive { get; set; }

        //PlayerGame has a 1 to 1 relationship with Player [PlayerId is a foreign key that references Player's PlayerId] so a reference to Player must be made
        //in order to communicate. 
        public virtual Player Player { get; set; }

        /* DO WE NEED THIS? */
        //PlayerGame has a 1 to 1 relationship with Game [GameId is a foreign key that references Game's GameId] so a reference to Game must be made
        //in order to communicate.  
        public virtual Game Game { get; set; }

        /* DO WE NEED THIS? */
        //PlayerGame has a 1 to 1 relationship with User [TeamId is a foreign key that references User's TeamId] so a reference to User must be made
        //in order to communicate.  
        public virtual User User { get; set; }
    }
}